﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};

	var planyearData = Jxstar.findComboData('planyear');
	var planstatusData = Jxstar.findComboData('planstatus');
	var moneytypeData = Jxstar.findComboData('moneytype');
	var authtypeData = Jxstar.findComboData('authtype');
	var plantypeData = Jxstar.findComboData('plantype');
	var projectjdData = Jxstar.findComboData('projectjd');
	var yesnoData = Jxstar.findComboData('yesno');
	var auditData = Jxstar.findComboData('audit');
	var baotypeData = Jxstar.findComboData('baotype');
	var resulttypeData = Jxstar.findComboData('resulttype');
	var plantype2Data = Jxstar.findComboData('plantype2');
	var checkdeptData = Jxstar.findComboData('checkdept');

	var cols = [
	{col:{header:'*预算年度', width:78, sortable:true, align:'center',
		editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: planyearData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false, allowBlank:false,
			value: planyearData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < planyearData.length; i++) {
				if (planyearData[i][0] == value)
					return planyearData[i][1];
			}
		}}, field:{name:'money_plan__plan_year',type:'string'}},
	{col:{header:'计划状态', width:75, sortable:true, defaultval:'41', align:'center',
		editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: planstatusData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: planstatusData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < planstatusData.length; i++) {
				if (planstatusData[i][0] == value)
					return planstatusData[i][1];
			}
		}}, field:{name:'money_plan__plan_status',type:'string'}},
	{col:{header:'*项目名称', width:212, sortable:true, editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.TextField({
			maxLength:100, allowBlank:false
		})}, field:{name:'money_plan__plan_name',type:'string'}},
	{col:{header:'投资内容与申请理由', width:263, sortable:true, hidden:true}, field:{name:'money_plan__plan_desc',type:'string'}},
	{col:{header:'*项目类别', width:102, sortable:true, align:'center',
		editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: moneytypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false, allowBlank:false,
			value: moneytypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < moneytypeData.length; i++) {
				if (moneytypeData[i][0] == value)
					return moneytypeData[i][1];
			}
		}}, field:{name:'money_plan__money_type',type:'string'}},
	{col:{header:'*申报部门', width:125, sortable:true, defaultval:'fun_getDeptName()', editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.TriggerField({
			maxLength:50,
			editable:false, allowBlank:false,
			triggerClass:'x-form-search-trigger', 
			onTriggerClick: function() {
				var selcfg = {pageType:'combogrid', nodeId:'sys_dept', layoutPage:'/public/layout/layout_tree.js', sourceField:'sys_dept.dept_name;dept_id', targetField:'money_plan.dept_name;dept_id', whereSql:"", whereValue:'', whereType:'', isSame:'0', isShowData:'1', isMoreSelect:'0',isReadonly:'1',queryField:'',likeType:'',fieldName:'money_plan.dept_name'};
				JxSelect.createSelectWin(selcfg, this, 'node_money_modify_editgrid');
			}
		})}, field:{name:'money_plan__dept_name',type:'string'}},
	{col:{header:'授权形式', width:79, sortable:true, align:'center',
		editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: authtypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: authtypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < authtypeData.length; i++) {
				if (authtypeData[i][0] == value)
					return authtypeData[i][1];
			}
		}}, field:{name:'money_plan__auth_type',type:'string'}},
	{col:{header:'*计划类型', width:74, sortable:true, defaultval:'yd', align:'center',
		editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: plantypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false, allowBlank:false,
			value: plantypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < plantypeData.length; i++) {
				if (plantypeData[i][0] == value)
					return plantypeData[i][1];
			}
		}}, field:{name:'money_plan__plan_type',type:'string'}},
	{col:{header:'*预计总投资(万元)', width:124, sortable:true, defaultval:'0', align:'right',
		editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12, allowBlank:false
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_plan__plan_money',type:'float'}},
	{col:{header:'*当年预计付款(万元)', width:134, sortable:true, defaultval:'0', align:'right',
		editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12, allowBlank:false
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_plan__year_money',type:'float'}},
	{col:{header:'数量', width:100, sortable:true, hidden:true, renderer:JxUtil.formatNumber(2)}, field:{name:'money_plan__plan_num',type:'float'}},
	{col:{header:'单位', width:100, sortable:true, hidden:true}, field:{name:'money_plan__plan_unit',type:'string'}},
	{col:{header:'单价(万元)', width:100, sortable:true, hidden:true, renderer:JxUtil.formatNumber(6)}, field:{name:'money_plan__plan_price',type:'float'}},
	{col:{header:'拟选供应商', width:100, sortable:true, hidden:true}, field:{name:'money_plan__provider',type:'string'}},
	{col:{header:'预计实施时间', width:102, sortable:true, hidden:true}, field:{name:'money_plan__plan_period',type:'string'}},
	{col:{header:'计划批复金额(万元)', width:133, sortable:true, defaultval:'0', align:'right',
		editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_plan__check_money',type:'float'}},
	{col:{header:'立项批复金额(万元)', width:129, sortable:true, defaultval:'0', align:'right',
		editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_plan__project_money',type:'float'}},
	{col:{header:'合同金额(万元)', width:111, sortable:true, defaultval:'0', align:'right',
		editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_plan__money_contract',type:'float'}},
	{col:{header:'已付款金额(万元)', width:116, sortable:true, defaultval:'0', align:'right',
		editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_plan__money_pay',type:'float'}},
	{col:{header:'决算审计金额(万元)', width:133, sortable:true, defaultval:'0', align:'right',
		editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.NumberField({
			decimalPrecision:6, maxLength:12
		}),renderer:JxUtil.formatNumber(6)}, field:{name:'money_plan__cost_money',type:'float'}},
	{col:{header:'投资计划批复文号', width:121, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:100
		})}, field:{name:'money_plan__check_fileno',type:'string'}},
	{col:{header:'立项批复文号', width:100, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:100
		})}, field:{name:'money_plan__project_fileno',type:'string'}},
	{col:{header:'当前形象进度', width:100, sortable:true, defaultval:'10', align:'center',
		editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: projectjdData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: projectjdData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < projectjdData.length; i++) {
				if (projectjdData[i][0] == value)
					return projectjdData[i][1];
			}
		}}, field:{name:'money_plan__project_process',type:'string'}},
	{col:{header:'主管部门', width:112, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TriggerField({
			maxLength:50,
			editable:false,
			triggerClass:'x-form-search-trigger', 
			onTriggerClick: function() {
				var selcfg = {pageType:'combogrid', nodeId:'sys_dept', layoutPage:'/public/layout/layout_tree.js', sourceField:'sys_dept.dept_name;dept_id', targetField:'money_plan.done_deptname;done_deptid', whereSql:"", whereValue:'', whereType:'', isSame:'0', isShowData:'1', isMoreSelect:'0',isReadonly:'1',queryField:'',likeType:'',fieldName:'money_plan.done_deptname'};
				JxSelect.createSelectWin(selcfg, this, 'node_money_modify_editgrid');
			}
		})}, field:{name:'money_plan__done_deptname',type:'string'}},
	{col:{header:'是否需要结转', width:100, sortable:true, align:'center',
		editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: yesnoData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: yesnoData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < yesnoData.length; i++) {
				if (yesnoData[i][0] == value)
					return yesnoData[i][1];
			}
		}}, field:{name:'money_plan__has_turn',type:'string'}},
	{col:{header:'是否结转', width:64, sortable:true, hidden:true, defaultval:'0', align:'center',
		editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: yesnoData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: yesnoData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < yesnoData.length; i++) {
				if (yesnoData[i][0] == value)
					return yesnoData[i][1];
			}
		}}, field:{name:'money_plan__is_turn',type:'string'}},
	{col:{header:'计划编号', width:107, sortable:true}, field:{name:'money_plan__plan_code',type:'string'}},
	{col:{header:'*申报日期', width:100, sortable:true, defaultval:'fun_getToday()', editable:true, hcss:'color:#0000ff;',
		editor:new Ext.form.DateField({
			format: 'Y-m-d', allowBlank:false,
			minValue: '1900-01-01'
		}),
		renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'money_plan__plan_date',type:'date'}},
	{col:{header:'申报人', width:61, sortable:true, defaultval:'fun_getUserName()', editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:20
		})}, field:{name:'money_plan__plan_user',type:'string'}},
	{col:{header:'记录状态', width:100, sortable:true, hidden:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: auditData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: auditData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < auditData.length; i++) {
				if (auditData[i][0] == value)
					return auditData[i][1];
			}
		}}, field:{name:'money_plan__auditing',type:'string'}},
	{col:{header:'备注', width:100, sortable:true, editable:true, hcss:'color:#3039b4;',
		editor:new Ext.form.TextField({
			maxLength:200
		})}, field:{name:'money_plan__plan_memo',type:'string'}},
	{col:{header:'主键', width:100, sortable:true, hidden:true}, field:{name:'money_plan__plan_id',type:'string'}},
	{col:{header:'申报人ID', width:100, sortable:true, hidden:true}, field:{name:'money_plan__plan_userid',type:'string'}},
	{col:{header:'申报部门ID', width:100, sortable:true, hidden:true}, field:{name:'money_plan__dept_id',type:'string'}},
	{col:{header:'授权时间', width:100, sortable:true, hidden:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'money_plan__auth_date',type:'date'}},
	{col:{header:'主管部门ID', width:100, sortable:true, hidden:true}, field:{name:'money_plan__done_deptid',type:'string'}},
	{col:{header:'父计划编号', width:100, sortable:true}, field:{name:'money_plan__plan_parentcode',type:'string'}},
	{col:{header:'计划包属性', width:100, sortable:true, hidden:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: baotypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: baotypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < baotypeData.length; i++) {
				if (baotypeData[i][0] == value)
					return baotypeData[i][1];
			}
		}}, field:{name:'money_plan__bao_type',type:'string'}},
	{col:{header:'型号规格', width:100, sortable:true, hidden:true}, field:{name:'money_plan__device_size',type:'string'}},
	{col:{header:'生产厂家', width:100, sortable:true, hidden:true}, field:{name:'money_plan__create_factory',type:'string'}},
	{col:{header:'固定资产编号', width:100, sortable:true, hidden:true}, field:{name:'money_plan__asset_code',type:'string'}},
	{col:{header:'出厂日期', width:100, sortable:true, hidden:true}, field:{name:'money_plan__create_date',type:'string'}},
	{col:{header:'上报金额(万元)', width:100, sortable:true, hidden:true, defaultval:'0', renderer:JxUtil.formatNumber(6)}, field:{name:'money_plan__app_money',type:'float'}},
	{col:{header:'是否上报国家局', width:100, sortable:true, hidden:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: yesnoData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: yesnoData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < yesnoData.length; i++) {
				if (yesnoData[i][0] == value)
					return yesnoData[i][1];
			}
		}}, field:{name:'money_plan__up_comp',type:'string'}},
	{col:{header:'提交备案时间', width:100, sortable:true, hidden:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'money_plan__up_sdate',type:'date'}},
	{col:{header:'备案下达时间', width:100, sortable:true, hidden:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'money_plan__up_edate',type:'date'}},
	{col:{header:'备案结果', width:100, sortable:true, hidden:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: resulttypeData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: resulttypeData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < resulttypeData.length; i++) {
				if (resulttypeData[i][0] == value)
					return resulttypeData[i][1];
			}
		}}, field:{name:'money_plan__up_result',type:'string'}},
	{col:{header:'调概后批复金额(万元)', width:100, sortable:true, hidden:true, defaultval:'0', renderer:JxUtil.formatNumber(6)}, field:{name:'money_plan__check_moneychk',type:'float'}},
	{col:{header:'投资计划批文名称', width:100, sortable:true, hidden:true}, field:{name:'money_plan__check_name',type:'string'}},
	{col:{header:'立项批文名称', width:100, sortable:true, hidden:true}, field:{name:'money_plan__project_checkname',type:'string'}},
	{col:{header:'国家局项目类别', width:100, sortable:true, hidden:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: plantype2Data
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: plantype2Data[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < plantype2Data.length; i++) {
				if (plantype2Data[i][0] == value)
					return plantype2Data[i][1];
			}
		}}, field:{name:'money_plan__money_type2',type:'string'}},
	{col:{header:'国家局项目编号', width:100, sortable:true, hidden:true}, field:{name:'money_plan__plan_code2',type:'string'}},
	{col:{header:'国家局批复金额(万元)', width:100, sortable:true, hidden:true, renderer:JxUtil.formatNumber(6)}, field:{name:'money_plan__check_money2',type:'float'}},
	{col:{header:'国家局批复年度投资(万元)', width:100, sortable:true, hidden:true, renderer:JxUtil.formatNumber(6)}, field:{name:'money_plan__year_money2',type:'float'}},
	{col:{header:'项目审批权限', width:100, sortable:true, hidden:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: checkdeptData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: checkdeptData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < checkdeptData.length; i++) {
				if (checkdeptData[i][0] == value)
					return checkdeptData[i][1];
			}
		}}, field:{name:'money_plan__check_right2',type:'string'}},
	{col:{header:'结转日期', width:100, sortable:true, hidden:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'money_plan__tran_date',type:'date'}},
	{col:{header:'是否实施包', width:100, sortable:true, hidden:true, align:'center',
		editable:false,
		editor:new Ext.form.ComboBox({
			store: new Ext.data.SimpleStore({
				fields:['value','text'],
				data: yesnoData
			}),
			emptyText: jx.star.select,
			mode: 'local',
			triggerAction: 'all',
			valueField: 'value',
			displayField: 'text',
			editable:false,
			value: yesnoData[0][0]
		}),
		renderer:function(value){
			for (var i = 0; i < yesnoData.length; i++) {
				if (yesnoData[i][0] == value)
					return yesnoData[i][1];
			}
		}}, field:{name:'money_plan__is_dobao',type:'string'}},
	{col:{header:'父计划ID', width:100, sortable:true, hidden:true}, field:{name:'money_plan__plan_parentid',type:'string'}},
	{col:{header:'项目id', width:100, sortable:true, hidden:true}, field:{name:'money_plan__project_id',type:'string'}},
	{col:{header:'立项批复日期', width:100, sortable:true, hidden:true, renderer:function(value) {
			return value ? value.format('Y-m-d') : '';
		}}, field:{name:'money_plan__project_checkdate',type:'date'}},
	{col:{header:'必要性、可行性、经济效益分析', width:100, sortable:true, hidden:true}, field:{name:'money_plan__project_cause',type:'string'}}
	];
	
	config.param = {
		cols: cols,
		sorts: null,
		hasQuery: '1',
		isedit: '1',
		isshow: '0',
		funid: 'money_modify'
	};
	
	
	
		
	return new Jxstar.GridNode(config);
}